//
//  QuotationTableCell.m
//  Trading365
//
//  Created by Jason on 12-2-14.
//  Copyright (c) 2012年 dhc. All rights reserved.
//

#import "QuotEditCell.h"
#import "InfoType.h"


@implementation QuotEditCell
@synthesize labName;
@synthesize textValue;
@synthesize row,section;
@synthesize editBeginBlcok;


- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)dealloc {
    [labName release];
    [textValue release];
}

-(void)initEditBeginBlcok:(EditBeginBlcok)editBeginBlcok1
{
    self.editBeginBlcok=editBeginBlcok1;
}

- (IBAction)textFieldDone:(id)sender {
    //块变量的调用
    if (self.editBeginBlcok!=nil) {
        NSString *tmp=[[NSString alloc] initWithFormat:@"%@",textValue.text];
        if ([tmp length] > 0)
            self.editBeginBlcok(tmp,section,row);
        [tmp release];
    }

    [textValue resignFirstResponder];
}

- (IBAction)textFieldDidEndEditing:(UITextField *)textField
{
    [textValue resignFirstResponder];
}

- (IBAction)textFieldDidBeginEditing:(UITextField *)textField
{
//    textField.;
}
@end
